<h1>Listing fragments</h1>

<table>
  <tr>
    <th>Institution</th>
    <th>Fragment type</th>
    <th>Name</th>
    <th colspan="6"></th>
  </tr>

<% for fragment in @fragments %>
  <tr>
    <td><%=h fragment.institution.name %></td>
    <td><%=h fragment.fragment_type.name %></td>
    <td><%=h fragment.name %></td>
    <td><%= link_to 'Show', fragment %></td>
    <td><%= link_to 'Edit', edit_fragment_path(fragment) %></td>
    <td><%= link_to 'Destroy', fragment, :confirm => 'Are you sure?', :method => :delete %></td>
    <td><%= link_to 'View Mappings', :controller => :fragments, :action => "mappings", :id => fragment.id %>
    <td><%= link_to 'Import Mappings', import_mappings_path(fragment) %></td>
    <td><%= link_to 'Download Mappings', :controller => :fragments, :action => "mappings", :id => fragment.id, :format => "xml" %>
  </tr>
<% end %>
</table>

<br />

<%= link_to 'New fragment', new_fragment_path %>
